package com.ehotting.edsta.mqbd.call;

import com.alibaba.fastjson.JSON;
import com.ehotting.edsta.mqbd.driverAdapt.http.caller.DriverAdaptCaller;
import com.ehotting.mqbd.api.bean.CommonResponse;
import com.ehotting.mqbd.api.bean.MQDataAble;
import com.ehotting.mqbd.api.bean.MQHttpData;
import com.ehotting.mqbd.api.bean.solver.SolverStateBean;
import com.ehotting.mqbd.core.call.HttpCallerAbstract;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public abstract class HttpCaller extends HttpCallerAbstract {

    private static Logger logger = LoggerFactory.getLogger(HttpCaller.class);

    @Override
    public void doAction(SolverStateBean serverState, MQDataAble mqData) {
        MQHttpData data  = (MQHttpData) mqData;
        logger.info("JSON.toJSONString(request):{}",JSON.toJSONString(data));

        String result = "{}";
        CommonResponse commonResponse = packCommonResponse(result, data.getRequest().getWebInfo());
        data.setResponse(commonResponse);
    }

    @Override
    public void validData(MQDataAble mqDataAble) {

    }
}